﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using sharp_net.Domain;
using sharp_net.Repositories;
using zkdao.Enum;

namespace zkdao.Domain {
    public abstract class UserRela {
        [Key]
        public int ID { get; set; }
        public Guid UserID { get; set; }
        public User User { get; set; }
        public int GiveGrade { get; set; }
    }
    public class UserRelaRebate : UserRela {
        public Guid RebateID { get; set; }
        public Rebate Rebate { get; set; }
        public int UserToRebateEnum { get; set; }
        public eUserToRebate UserToRebate {
            get { return (eUserToRebate)UserToRebateEnum; }
        }
    }

    #region Data
    public abstract class UserRelaData {
        public int ID { get; set; }
        public int GiveGrade { get; set; }
        public string UserID { get; set; }
        public UserData User { get; set; }
    }
    public class UserRelaRebateData : UserRelaData {
        public string RebateID { get; set; }
        public RebateData Rebate { get; set; }
        public int UserToRebateEnum { get; set; }
    }
    #endregion
}